﻿@using NetSurveillance.WebApp.Utilities
@model NetSurveillance.WebApp.Models.LogOnModel
@{
    ViewBag.Title = Resources.MenuResource.Log_On;
    Layout = null;
}
<!DOCTYPE html>
<html>
    <head>
        <title>@ViewBag.Title</title>
        @*todo:favicon.ico必须在发布后去掉*@
        <link rel="shortcut icon" href="http://www.google.com/favicon.ico" />
        @*<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />*@
        <link href="@Url.Content("~/Content/MainStyle.css")" rel="stylesheet" type="text/css" />
        <script src="@Url.Content("~/Scripts/jquery-1.8.3.min.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/Scripts/json2.min.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/Scripts/appScripts/jquery.netsurveillance.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
        <style type="text/css">
            body
            {
                background-color: #d2d3d6;
                margin-left: 0px;
                margin-top: 0px;
                margin-right: 0px;
                margin-bottom: 0px;
            }

            .logoin_box
            {
                background-image: url(@Url.Content("~/Content/images/logoin_bj.png"));
                height: 240px;
                width: 500px;
                margin-top: 10%;
                margin-right: auto;
                margin-bottom: auto;
                margin-left: auto;
                padding-top: 160px;
                padding-left: 80px;
            }

            .td_1
            {
                font-size: 13px;
                line-height: 30px;
                font-weight: bold;
                color: #666;
                text-align: right;
                float: left;
                height: 24px;
                width: 80px;
                margin-bottom: 10px;
            }

            .td_2
            {
                float: left;
                height: 30px;
                width: 420px;
                margin-bottom: 10px;
            }

            .logoin_input
            {
                background-color: #fff;
                height: 28px;
                width: 250px;
                border: 1px solid #9e9fa4;
                font-size: 14px;
                line-height: 30px;
                font-weight: normal;
                color: #555;
                margin: 0px;
                padding: 0px;
            }

            .btn_login
            {
                font-size: 14px;
                line-height: 30px;
                font-weight: bold;
                color: #fff;
                background-image: url(@Url.Content("~/Content/images/btn_logonin.gif"));
                height: 34px;
                width: 122px;
                border: 0;
            }

            .btn_quit
            {
                background-image: url(@Url.Content("~/Content/images/btn_QUIT.gif"));
                height: 34px;
                width: 122px;
                margin-left: 5px;
                font-size: 14px;
                line-height: 30px;
                font-weight: bold;
                color: #666;
                border: 0;
            }
        </style>
        <script type="text/javascript">
            $(function() {
                if (top.location != self.location)
                    top.location.href = '@Url.Action("LogOn","Account")';
            });
        </script>
    </head>
    <body>
        @*<p>
            Please enter your username and password. @Html.ActionLink("Register", "Register") if you don't have an account.
        </p>*@

        @using (Html.BeginForm())
        {
            <div class="logoin_box">
                <div class="validation-summary-errors" id="errorContain">
                    @TempData[PresetValues.TempDataKeys.ErrorMessage]
                    @Html.ValidationSummary(true, Resources.MessageResource.LogonUnSuccInfo)
                </div>
                <span class="td_1">
                    @Html.LabelFor(m => m.UserName)
                </span>
                <span class="td_2">
                    @Html.TextBoxFor(m => m.UserName, new {@class = "logoin_input"})
                    @Html.ValidationMessageFor(m => m.UserName)
                </span>
                <span class="td_1">
                    @Html.LabelFor(m => m.Password)
                </span>
                <span class="td_2">
                    @Html.PasswordFor(m => m.Password, new {@class = "logoin_input"})
                    @Html.ValidationMessageFor(m => m.Password)
                </span>
                <span class="td_1">@Html.LabelFor(p => p.Lang)</span>
                <span class="td_2">
                    @Html.DropDownListFor(m => m.Lang, ViewData["LangList"] as SelectList, new { @class = "logoin_input" })
                </span>
                <span class="td_1"></span>
                <span class="td_2">
                    <input name="button" type="submit" class="btn_login" id="button" value="登录" />
                </span>
            </div>
        }
    </body>
</html>